title: Using BIT datatype to filter a query in the WHERE clause
body: <p>I'm building a stored procedure that uses a bit parameter.
  this bit parameter is used to filter the email column.</p>
  
  <p>if @param is 1 - show all clients that has an email.</p>
  
  <p>if @param is 0 - show all clients without an email.</p>
  
  <p>and if @param is null (not passed to the procedure) - show both clients with and without an email.</p>
  
  <p>that not going so well. any any suggestion?</p>
  
  <pre><code>where case @email when 1 then email is not null
                   when 0 then email is null)
  </code></pre>