Try this:
SELECT [1] AS A1, [2] ASD A2, [3] AS A3, [4] AS A4, [5] AS A5
FROM
(
SELECT ID, Salary
FROM SalaryTable
) AS SourceTable
PIVOT
(
SUM(Salary)
FOR ID IN ([1], [2], [3], [4], [5])
) AS PivotTable
This is my first attempt using
PIVOT[
^] so I hope it is correct.