SUM(
    CASE 
        WHEN `type` = 'EGAME' THEN 
            CASE 
                WHEN `ACTION` = '2' THEN turnover 
                WHEN `ACTION` = '3' THEN -cancel 
                ELSE 0 
            END
        WHEN `type` = 'TABLE' AND `ACTION` = '2' THEN 
            CASE 
                WHEN `ACTION` = '1' THEN turnover
                WHEN `ACTION` = '2' THEN turnover 
                WHEN `ACTION` = '3' THEN -cancel 
                ELSE 0 
            END 
        ELSE 0 
    END
)