title: updating multiple columns using case statement in sql server
body: <p>I would like to update the table using case statement the query is like this...</p>
  
  <pre><code>select case(@columnname) when 'name1' then 
                                    begin
                                       update table
                                        set 
                                         pay1=pay1* 100
                                         pay2=pay2*20
                                         pay3=pay3* 100
                                    end
                          when 'name2' then 
                                         begin
                                       update table
                                        set 
                                         pay2=pay2*20
                                         pay3=pay3* 100
                                    end
  
                           when 'name3' then 
                                         begin
                                       update table
                                        set 
                                         pay3=pay3* 100
                                    end
                    end
  </code></pre>
  
  <p>can u please tell the correct logic to complete the query using case statement</p>