This is a little weird and doesn’t have enough information but come on.
select * from tabela where user_id = $user_id || user_group = $user_group || find_in_set($user_level, user_level) || find_in_set($user_type, user_type) || find_in_set($user_role, user_role) || (user_id = null && user_group = null && user_level = null && user_type = null && user_role)
I put in the Github for future reference.
This works if these fields that may have more than one value have only one digit.
I interpreted the rules as I could visualize in the question. If this is not it you should make the rules clearer. You even said where this information comes from, I assumed again. I also assumed that the void would be null.
I ended up asking the question in a hurry, because I didn’t want to have to tell a whole story of my situation, and the problem was an illumination on the logic of filtering. I used a more generic situation possible to facilitate understanding. I confess that in your place, I wish to know more about it, for my help be the best possible for situation. Thank you all for your help! Unfortunately I can not upvote the reply of @Caffé, which was the one that solved my problem, very obvious :)
– Julio Vedovatto