Ok ho trovato una soluzione, se qualcuno ha comunque idee migliori ben venga...

la mia soluzione è:

select sum(a.valore) from
(select sum(val1) as valore from prova where val1='X'
UNION
select sum(val2) as valore from prova where val2='X') as a

funziona...