How to avoid redundant case/when in Postgres?
You should add a condition for every counter:

select
    sum(case when x = 1 and y = 1 then 1 else 0 end) as counter_x,
    sum(case when x = 1 and y = 2 then 2 else 0 end) as counter_y,
    sum(case when x = 1 and y &gt; 2 then 7 else 0 end) as counter_z,
    sum(case when x = 1 then 1 else 0 end) as counter_a,
    sum(case when x = 2 and y = 1 then 10 else 0 end) as counter_b,
    sum(case when x = 3 and y = 30 then 400 else 0 end) as counter_c
from 
    some_data;

counter_x | counter_y | counter_z | counter_a | counter_b | counter_c
--------: | --------: | --------: | --------: | --------: | --------:
        1 |         4 |         7 |         4 |        20 |         0


dbfiddle here