title: using case statement in a where clause
body: <p>Hello I am missing something because my code errors.</p>
  <pre><code>select * from ##ScheduleDetail SD
  left join ##HolidayFilterTbl HF on SD.Scheduledate = HF.Testdate
  
  where (ScheduleDate = testdate)
  and
  (Case 
   when HF.IsHoliday = 1 then (overtime = 1 and makeup = 0)
   else
  (overtime = 0 and Makeup = 0)
  end
  )
  and
  DOW = 5 
  order by ActivityStartTime
  </code></pre>
  <p>I've attempted several combinations and each one errors at either the first equal sign or the second. What am I missing?</p>