SUM 2 columns with 2 columns same name
Looks like a list of match results and you want to get won/lost points:

SELECT team, SUM(pointa), SUM(pointb)
FROM
 ( -- use all rows twice with switched points
   SELECT teama AS team, pointa, pointb
   FROM tab
   UNION ALL
   SELECT teamb, pointb, pointa
   FROM tab
 ) AS dt
GROUP BY team