Q&A for committed Christians, experts in Christianity and those interested in learning more
CREATE table #yourtable ([Id] int, [Value] varchar(6), [ColumnName] varchar(13)) ; INSERT INTO #yourtable ([Id], [Value], [ColumnName]) VALUES (1, 'John', 'FirstName'), (1, '2.4', 'Amount'), (2, 'ZH1E4A', 'FirstName'), (2, '5', 'Amount') ; select max(case when columnname = 'FirstName' then value end) Firstname, max(case when columnname = 'Amount' then value end) Amount from #yourtable group by id