I dont really know how to put this but please kindly check the details below.
Student
|Student_ID|Student_Name|
|1 |Ryan
Try,
SELECT a.Student_name,
MAX(CASE WHEN subject = 'MATH' THEN grade ELSE NULL END) MathGrade,
MAX(CASE WHEN subject = 'ENGLISH' THEN grade ELSE NULL END) EnglishGrade,
MAX(CASE WHEN subject = 'History' THEN grade ELSE NULL END) HistoryGrade
FROM Student a
LEFT JOIN Grade b
ON a.Student_ID = b.Student_ID
GROUP BY a.Student_name