title: Updating multiple columns of table based on condition
body: <p>I want to update multiple columns of a table based on certain condition.
  Is there any solution to make the update in single query</p>
  
  <p>I am updating each column on different condition which result in higher cost</p>
  
  <p>--Custom0</p>
  
  <pre><code>  IF(xoldcustom0     = xnewcustom0) THEN
        UPDATE table_name
        SET custom0=xxoldcustom0copy
        WHERE id        =column_id
     END IF;
  </code></pre>
  
  <p>--Custom1</p>
  
  <pre><code>   IF(xoldcustom1     = xnewcustom1) THEN
        UPDATE table_name
        SET custom1=xxoldcustom1copy
        WHERE id        =column_id
     END IF;
  </code></pre>
  
  <p>can we update the above code in single query based on a condition</p>