title: how to update column based on condition
body: <p>i have a requirement to update a column in a table, if the column has null or value which is not like input.</p>
  
  <p>Is it possible to do it in a single sql query.? my db is db2</p>
  
  <p>i have tried the below one, but even if the change is not there, it is updating. i dont want that .</p>
  
  <pre><code>UPDATE ABC 
  SET AG = CASE 
    WHEN AG IS NULL
      OR AG &lt;&gt; 1000010 
    THEN 1000010
    ELSE AG
  END, 
       P = CASE 
    WHEN P IS NULL 
      OR P &lt;&gt; 1235
    THEN 1235
    ELSE P 
  END
  WHERE c = 607
  </code></pre>