title: SQL If-Else in the WHERE clause with conditions based on column values
body: <p>How would you rewrite the WHERE clause in this pseudo-SQL?</p>
  
  <pre><code>SELECT *
  FROM   MyTable
  WHERE  IF ( Col1 &lt;&gt; '' ) Col1 = @Val1
         ELSEIF ( Col2 &lt;&gt; '' ) Col2 = @Val2
  </code></pre>