One method of converting column data into row data is to INNER JOIN the table to itself, multiple times
SELECT A.someVal, A.colx, B.colx, C.colx . . . .
FROM Table1 as A
INNER JOIN Table1 as B
ON A.someVal=B.someVal
INNER JOIN Table1 as C
on A.someVal = C.someVal
.
.
.
WHERE (etc.)