title: Pivot with prefixed column names in Oracle 11g
body: <p>Using Oracle 11g I wish to pivot the following table</p>
  
  <pre><code>ID  PREFIX  VALUE1  VALUE2
  1   C01_    123     AAA
  1   C02_    456     BBB
  1   C03_    789     CCC
  2   C01_    123     AAA
  2   C02_    456     BBB
  3   C01_    123     AAA
  </code></pre>
  
  <p>to</p>
  
  <pre><code>ID  C01_VALUE1  C01_VALUE2  C02_VALUE1  C02_VALUE2  C03_VALUE1  C03_VALUE3
  1   123         AAA         456         BBB         789         CCC
  2   123         AAA         456         BBB         null        null
  3   123         AAA         null        null        null        null
  </code></pre>
  
  <p>In practice there are more than two value columns. In short, I would like to find a way to pivot the table prefixing column names using the prefix column.</p>