For Sql Server, you may need to look at the reference function. Here is an example that matches your scenario and displays the results you wanted ...
declare @data table (CASEID int, FORMNAME varchar(20), NAME varchar(20), VALUE varchar(20)) insert into @data values (601554, 'CASEFORM', 'Mond', 'AAA'), (601554, 'CASEFORM', 'Tues', 'BBB'), (601554, 'CASEFORM', 'Wedn', 'CCC'), (601554, 'CASEFORM', 'Thur', 'DDD') SELECT * FROM @data PIVOT ( MAX(VALUE) FOR [NAME] IN ([Mond],[Tues],[Wedn],[Thur]) ) AS data
source share