I guess trying the following would do for you:
SELECT team1, team2,
CASE
WHEN goal1 - goal2 > 0 THEN 3
WHEN goal1 - goal2 = 0 THEN 1
WHEN goal1 - goal2 < 0 THEN 0
END AS 'point1',
CASE
WHEN goal1 - goal2 > 0 THEN 0
WHEN goal1 - goal2 = 0 THEN 1
WHEN goal1 - goal2 < 0 THEN 3
END AS 'point2'
FROM 'results';
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --