update multiple rows with multiple columns using loop

hi mate,

i have this query statement

UPDATE kai
SET `0522` = CASE WHEN `0522` IS NULL OR '0' THEN '' ELSE '1' END,
`0529` = CASE WHEN `0529` IS NULL OR '0' THEN '' ELSE '1' END,
`0605` = CASE WHEN `0605` IS NULL OR '0' THEN '' ELSE '1' END,
`0610` = CASE WHEN `0610` IS NULL OR '0' THEN '' ELSE '1' END,
`0610b` = CASE WHEN `0610b` IS NULL OR '0' THEN '' ELSE '1' END,
`0612` = CASE WHEN `0612` IS NULL OR '0' THEN '' ELSE '1' END,
`0619` = CASE WHEN `0619` IS NULL OR '0' THEN '' ELSE '1' END,…

update multiple rows with multiple columns using loop