title: How can I select rows with value of No or NULL when the parameter = 'No' and rows with value of 'Yes' when the parameter ='Yes'
body: <p>I need to select rows based upon the parameter '@HotList'.</p>
  
  <p>When '@HotList' = 'Yes' I need to pull all rows where the 'co.ro_HotList' field holds the value of 'Yes' 
  When '@HotList' = 'No' I need to pull all rows where the 'co.ro_HotList' field holds the value of 'No' OR null</p>
  
  <p>I can select the rows where the value is 'Yes' or 'No' just based on the parameter, but cannot figure out how to also select the Null rows when parameter is 'No'. How can I modify the provided code to achieve this?</p>
  
  <p>I have tried using a case statement in the where clause but with no luck. </p>
  
  <pre><code>SELECT ds.*                     
  FROM Rotex_DailyShipmentNotShip ds
  left outer join CRM_MSCRM..SalesOrder co ON ds.SOP#=co.Name 
  WHERE co.ro_HotList = @HotList
  </code></pre>