Check out example codes for "mysql update multiple rows with different values". It will help you in understanding the concepts better.

Code Example 1

UPDATE config
   SET config_value = CASE config_name 
                      WHEN 'name1' THEN 'value' 
                      WHEN 'name2' THEN 'value2' 
                      ELSE config_value
                      END
 WHERE config_name IN('name1', 'name2');

Learn ReactJs, React Native from akashmittal.com