Convert from multiple to one line result

SELECT STUFF(
             (SELECT ',' + Semesters 
              FROM table t1
              FOR XML PATH (''))
             , 1, 1, '') AS Semesters from table t2