Check out example codes for "sql run multiple updates in one query". It will help you in understanding the concepts better.

Code Example 1

UPDATE table_name
SET   field_name = 
      case  field_name2 
      when 'value' then 'change_to'
      when 'value2' then 'change_to2'
end

Learn ReactJs, React Native from akashmittal.com