SQL Server UNPIVOT Examples: UNPIVOT Columns to Rows with Built-In UNPIVOT Operator or UNION ALL Statements
SQL Server: UNPIVOT Columns to Rows with Built-In UNPIVOT Operator. Alternatively, Use UNION ALL Statements to UNPIVOT to Convert Columns to Rows.