select
user_id,
otziv_id,
SUM(CASE WHEN ocenka = 1 THEN 1 ELSE 0 END) ocenka_1,
SUM(CASE WHEN ocenka = 2 THEN 1 ELSE 0 END) ocenka_2,
SUM(CASE WHEN ocenka = 3 THEN 1 ELSE 0 END) ocenka_3,
....
from otziv_table
group by user_id, otziv_id
having user_id = #####