Unlike in PySpark, I rarely see PIVOT used in SQL Server — maybe because the column names have to be explicitly written, and we don’t always know them in advance. I guess developers prefer CASE … WHEN ...