select * from tbl order by match() descending;
where match() is a function that returns the number of matches, perhaps designed along the lines:
if ball1 in (val1, val2, ..., val7) then total=total+1;
if ball2 in (val1, val2, ..., val7) then total=total+1;
if bonusball in (val1, val2, ..., val7) then total=total+1;
where val1..val7 are the numbers the user picks.
Are you sure you have the correct bonus rules? In the UK lottery you pick six numbers, not seven as in your spec, and the jackpot goes to someone who picks Ball1..Ball6; the next highest prize goes to someone with five matches and the bonus, then to five, then four, then three.