That'a common question, search for "PIVOT query" :-)
Assuming one Name can have multiple Subjects you need to use MAX/GROUP BY, otherwise simply remove the aggregation.
select
Name,
max(case when Subjects = 'math' then 'Y' else 'N' end) as Math,
max(case when Subjects = 'science' then 'Y' else 'N' end) as Science,
max(case when Subjects = 'english' then 'Y' else 'N' end) as English
from tab
group by Name