I have a table (T)
User | Language | Value
-----------------------
1 |1 | string
1 |2 | otherString
and want to merge/join them to get this
User | Language_1 | Language_2
--------------------------------
1 |string | otherString
I tried something like this
SELECT USER,
(CASE WHEN Language = 1 THEN Value END) AS language_1,
(CASE WHEN Language = 2 THEN Value END) AS language_2
FROM T
But I get something like this as result (I should have expected this)
User | Language_1 | Language_2
--------------------------------
1 |string | NULL
1 |NULL | otherString
Whats the right way to do it?