title: How to simulate COALESCE conditions in WHERE clause
body: <p>Say I have the following:</p>
  
  <pre><code>SELECT    * 
  
  FROM      Xyz 
  
  WHERE     (@a IS NULL OR a = @a) AND
            (@b IS NULL OR b = @b) AND
            (@c IS NULL OR c = @c)
  </code></pre>
  
  <p>What I want to accomplish is to change the WHERE clause to use the conditions in a sort of <code>COALESCE</code> fashion where it would use the first condition that was not null or it ran out conditions.</p>
  
  <p>In pseudo speak it would be something like:</p>
  
  <pre><code>WHERE    IF @a IS NOT NULL THEN
           (
               a = @a
           )
           ELSE IF @b IS NOT NULL THEN 
           (
               b = @b
           )
           ELSE IF @c IS NOT NULL THEN 
           (
               c = @c
           )
  </code></pre>
  
  <p>Is this possible?</p>