title: If/then/else in SQL Query
body: <p>I would like to check a date value in my SQL query. If a date is equal to a predefined date then do not print anything, ELSE print the existing date value.</p>
  
  <p>How can I write it correctly in order to take the desired date value ?</p>
  
  <p>I have the following query:</p>
  
  <pre><code>(SELECT (CASE 
               WHEN (PaymentsMade.PaymentDate = '09/09/1987') THEN ' '
               ELSE PaymentsMade.PaymentDate
           END)
   ) as dateOfPayment
  </code></pre>
  
  <p>When I run this query it works correctly when the date is equal to '09/09/1987' , whereas when the date is not equal to '09/09/1987' it prints '01/01/1900'.</p>
  
  <p>How can I retrieve the dates values that are not equal to the predefined date '09/09/1987'?</p>
  
  <p>Any advice would be appreciated.
  Thanks</p>