Dynamic column value to columns name mySQL
You can solve it on this way:

Select all distinct StudentId, and join its with two subqueries, one with all answers about Gender and another with all answers about Age, both grouped by StudentId.

select    distinct q.StudentId,
          g.Answer as YourGender,
          a.Answer as YourAge
from      questions q
left join (
           select   StudentId, Answer
           from     questions
           where    View = 'Gender'
           group by StudentId
          ) g
on         g.StudentId = q.StudentId
left join (
           select   StudentId, Answer
           from     questions
           where    View = 'Age'
           group by StudentId
          ) a
on         a.StudentId = q.StudentId
;


This is the result:

| StudentId | YourGender | YourAge |
|-----------|------------|---------|
| 1         | Male       | 23      |
| 2         | Female     | 21      |


Can check it here: http://rextester.com/XPNAT23300