title: How to compare three column in sql
body: <p>I want compare 3 column value which comparison value from <strong>Col2</strong> in table.</p>
  
  <p><code>Col1   Col2    Col3</code></p>
  
  <p><code>12      &lt;      25      TRUE</code></p>
  
  <p><code>25      &gt;      20      TRUE</code></p>
  
  <p><code>15      =      25      FALSE</code></p>
  
  <pre><code>SELECT (case when Col2 = '&lt;' then  Col1 &lt; Col3 else  Col1  end)
  </code></pre>
  
  <p>Can anyone help me ?
  Advanced Thanks.</p>