
CASE 
WHEN `action_type` = 'single' THEN 
    CASE 
        WHEN `action` = '2' THEN -bet 
        WHEN `action` = '3' THEN bet 
        ELSE 0 
    END
WHEN `action_type` = 'multiple' THEN 
 	CASE 
 		  WHEN `action` = '1' THEN -amount
 		  WHEN `action` = '3' THEN -amount
        ELSE 0 
    END
ELSE 0 
END
