title: how to select same column with different condition?
body: <p>I am trying to select data from two tables.<br>
  -warehouse has two columns: warehouseId, warehouseName<br>
  -transportation has three columns: transporter, warehouseId1, warehouseId2<br>
  i want to select from two tables and get warehouseName from table A for warehouseId1 and warehouseId2 
  here is my code but it does not work.</p>
  
  <pre><code>select a.transporter, b.warehouseName as warehouse1, b.warehouseName as warehouse2
  from transportation a, warehouse b
  where a.warehouseId1 = b.warehouseId and a.warehouseId2 = b.warehouseId
  </code></pre>