sql query to fetch details when one of value is missing : Consider a table with entries student

      cloumn1      column2      column3
      john         age            23
      john         salary         100
      John          rollno        12
      Raj          age            24
      Raj          rollno         10
here I want to get result of salary value when queried on salary and student 
name
It is always quried on salary and student...for the second student since salary record itself is not there ..I am facing the issue in fetching the records

request every one to throw your solutions

thanks in advance
