limit the number of rows returned when a condition is met?
I'm not sure how this will scale but it's an answer :)

I should note that I'm summing for CN.RowNum &lt; ClassNumbered.RowNum and not &lt;= for a reason.  This way I can return everything lower than the requested value (2.0 in this case).  If I did &lt;= then I would have to return everything &lt;= 2.0 which won't work if the three values happen to be .5, 1 and 1 for a total of 2.5.  You wouldn't get the last class.  I also broke this up by subject so that if you have more than one subject you will get multiple groupings by subject.

WITH ClassNumbered AS (SELECT [Subject], Name, Grade, Credit, Pass,
                        ROW_NUMBER() OVER (ORDER BY [Subject],Credit,Grade) AS RowNum
                    FROM Classes),
    ClassTotals AS (SELECT [Subject], Name, Grade, Credit, Pass,
                        (SELECT ISNULL(SUM(Credit),0) FROM ClassNumbered CN
                            WHERE CN.[Subject] = ClassNumbered.[Subject]
                              AND CN.RowNum &lt; ClassNumbered.RowNum) AS RunningTotal
                    FROM ClassNumbered)
SELECT * 
FROM ClassTotals
WHERE RunningTotal &lt; 2.0