title: SQL row_number() with conditions
body: <p>I have the following information in SQL Server table:</p>
  
  <p><img src="https://i.stack.imgur.com/BRwqM.png" alt="enter image description here"></p>
  
  <p>How can I add C1-C2-C3-C4 columns? To do this each colum has different conditions. I'm using <code>row_number() order by id_pv desc</code>, but it doesn't work.</p>