I know that sounds very confusing, but I have a few examples. I want it so that I can flick something like 3 levers and have the output be the leftmost one. If I flicked the first two, the middle one would turn on, and if i flicked only the right one, the right one would turn on. During this all of the other ones would be off. Here are some examples:
[[![!\[][1]][1][![\]\[1\]][2]][2]][3]

[![enter image description here][4]][4]


  [1]: https://i.sstatic.net/WHmjh.png
  [2]: https://i.sstatic.net/JYRrL.png
  [4]: https://i.sstatic.net/q0hwq.png

I could use either command blocks or survival redstone. Thank you so much!