title: sql - sum columns from same table having multiple unique ids
body: <p>I  would like to sum 3 columns from the same table based on three unique id.</p>
  
  <pre><code>If id="1" sum(area1) 
  If id="2" sum(area2)
  if id="3" sum(area3)
  </code></pre>
  
  <p>Table data:</p>
  
  <pre><code>id area1 area2 area3
  1   10     2    10
  1    1     10    10
  2    1     10    10
  3    1     10    10
  3  10     2     10
  </code></pre>
  
  <p>Output should be:</p>
  
  <p>id1= 43 id2 = 21 id3 = 43</p>
  
  <pre><code>Select houseID, sum(area1), b.sum(area2), c.sum(area3) FROM table1, table1 b, table1 c
  WHERE table1.id="1" or b.id = "2" or c.id="3"
  </code></pre>