title: Rails Update Column 1 where Value, Update Column 2 where Value in single query
body: <p>I can work on the following code:</p>
  
  <pre><code>Contact.where(tag1: tag_ids).update_all(tag1: nil)
  Contact.where(tag2: tag_ids).update_all(tag2: nil)
  </code></pre>
  
  <p>Is it possible to execute a certain query in rails where it needs to update specific column if its value satisfied, and/or update another column if its value is also satisfied. Sorry for bad explanation, please refer to code above.</p>
  
  <p>Above code can do exactly what I want, but in case there is a better way or single-line code to this?</p>