i find CASE / WHEN to be easier to construct, as in @john-rotenstein's answer, but Redshift does have a built-in PIVOT function:
SELECT
a,
b,
id
FROM
(SELECT * FROM temp)
PIVOT
(MAX(value) FOR source IN ('A', 'B'))
ORDER BY
id
;
+----+----+---+
|a |b |id |
+----+----+---+
|C123|V123|111|
|C456|V456|222|
+----+----+---+