title: Join three Tables with 2 different Columns
body: <p>Here is the thing:</p>
  
  <p>I have three tables:</p>
  
  <p><strong>Table1:</strong>
  COL1 COL2<br>
  <strong>Table2:</strong>
  COL2 COL3<br>
  <strong>Table3:</strong>
  COL3 COL4</p>
  
  <p>And I want to select the COL4 from <code>Table3</code> when <code>Table.COL3 = TABLE2.COL3</code>, which the <code>Table2.COL3</code> from when <code>Table2.COL2 = Table1.COL2</code></p>
  
  <p>It likes two join table, but when I use the following query it doesn't work.</p>
  
  <pre><code>SELECT * FROM 
           table3
           INNER JOIN table2 ON table3.col3 
           =
           ( 
            SELECT  table2.col3
                    FROM table2
                    INNER JOIN table1 ON 
                    table1.col2 = table2.col2
           )
  </code></pre>