SQL话语书写

SQL语句书写我的表结果如下:想达到如下效果的SQL语句怎么写?Oracle[解决办法]select col1,case col2 when

SQL语句书写
我的表结果如下:
SQL话语书写

想达到如下效果的SQL语句怎么写?
SQL话语书写 Oracle
[解决办法]
select col1,case col2 when 'B1' then col3
[解决办法]
';'
[解决办法]
col4 end B1,
            case col2 when 'B2' then col3
[解决办法]
';'
[解决办法]
col4 end B2,
            case col2 when 'B3' then col3
[解决办法]
';'
[解决办法]
col4 end B3
from test3
[解决办法]
不好意思,写错了一个关键字
select cola,case (when colb='B1' then colc
[解决办法]
';'
[解决办法]
cold else null) as B1,
case (when colb='B2' then colc
[解决办法]
';'
[解决办法]
cold else null) as B2,
case (when colb='B3' then colc
[解决办法]
';'
[解决办法]
cold else null) as B3 from table