title: CASE WHEN in WHERE Statement
body: <p>I'm very new to SQL and am having trouble with a Where Statement.  I'm trying to look at Checks from Yesterday and a week from yesterday,  unless today (Today being the day the query is run) is a Monday, then I want to look at Friday and the friday Prior.  The Error message is "Expected something between the word 'Check_date' and '='.</p>
  
  <pre><code>WHERE
      CASE WHEN DAYOFWEEK(date) = 2 
          THEN (a.check_date = DATE - 3 OR a.check_date = DATE - 10)
          ELSE (a.check_date = DATE - 1 OR a.check_date = DATE - 8) END
  </code></pre>