Let's say I have a table like this
Col1 Col2
A 0.1
B 2.4
B 2.1
C 5.0
... ...
and that I want to obtain this other table
ColA ColB ColC
0.1 0 0
0 2.4 0
0 2.1 0
0 0 5.0
... ... ...
To create one single column I can use a CASE WHEN
as
SELECT CASE WHEN Col1 = 'A' THEN Col2 ELSE 0 END AS ColA FROM TABLE
But I don't know a priori how many different categories I have in Col1 and there can be many of them. How could I obtain this result with BigQuery?