1-- convert rows to columns in sql server (PIVOT)
2SELECT Firstname, Amount, PostalCode
3FROM (
4 SELECT value, columnname
5 FROM yourtable
6 ) d
7PIVOT (
8 max(value)
9 FOR columnname IN (Firstname, Amount, PostalCode)
10) piv;