It depends.
It would be a qualified education expense if your school is an eligible educational institution and issues you a form 1098-T.
Please see this IRS document.