Můžete použít UNPIVOT
operaci k získání výsledků
SELECT col, value
FROM
(SELECT CAST(col1 AS VARCHAR) AS col1, CAST(col2 AS VARCHAR) AS col2,
CAST(col3 AS VARCHAR) AS col3, CAST(col4 AS VARCHAR) AS col4
FROM Table1) p
UNPIVOT
(value FOR col IN
(col1, col2, col3, col4)
) AS unpvt;