title: SQL handling null values
body: <p>The issue is i have 3 conditions good bad ugly. My goal is  if one of the following condition is null then replace null to 0 else if all the conditions are null then show it as null</p>
  
  <pre><code>case when 'Good' is not  null or 'Bad' is not null or 'Ugly' is not null 
       then coalesce(value,0) 
       else value
  end result
  </code></pre>
  
  <p>The problem here is even with the condition it turns all the nulls to 0 which is not what i want.  Thanks in advance</p>