title: CASE statement where data in one row depends on another row
body: <p>I have the following data showing in my view:</p>
  
  <p><img src="https://i.stack.imgur.com/hq7LG.png" alt="enter image description here"></p>
  
  <p>I am looking for some code where if PM_NO 4 for FEB is ANNUAL then MONTHLY, QUARTERLY and HALFYEAR are null'd out.  The same goes for if PM_NO 2 for MAY is QUARTERLY then MONTHLY is null'd out etc.  Is this possible on Oracle SQL.</p>
  
  <p>Regards,</p>
  
  <p>Jon Ditchfield</p>