title: Joining two select queries from the same table
body: <p>The table contains an ID column, valueHeading column and a value column. I want to separate the value column into two new columns called valueHeading1 and valueHeading2 depending on which type of valueHeading the value has.</p>
  
  <p>So I want to join this select:
  <strong>Edit: Full join</strong></p>
  
  <pre><code>SELECT ID
        ,valueHeading
        ,value as 'valueHeading1'
  FROM table1
  WHERE valueHeading = 'valueHeading1'
  </code></pre>
  
  <p>With This select:</p>
  
  <pre><code>SELECT ID
        ,value as 'valueHeading2'
  FROM table1
  WHERE valueHeading = 'valueHeading2'
  </code></pre>
  
  <p>on their respective ID's. How do I do this?</p>
  
  <p><strong>Edit</strong> to illustrate what I want to do:</p>
  
  <p>Original table:</p>
  
  <pre><code>ID    valueHeading    value
  0     valueHeading1    a
  0     valueHeading2    a
  1     valueHeading1    ab
  1     valueHeading2    NULL
  2     valueHeading1    abcd
  2     valueHeading2    abc
  </code></pre>
  
  <p>New Table:</p>
  
  <pre><code>ID    valueHeading1    valueHeading2
  0          a               a
  1          ab              NULL
  2         abcd             abc
  </code></pre>