relay or ic with multiple outputs based on varying input voltage

I've got this pet project i'm working on, wiring up an ir sensor to a computer serial port. The sensor has a varying voltage based on proximity to the sensor (.5v to 3v). I'm looking for a relay/ic/other component that would take the varying voltage as an input and at 2 or 3 different levels trigger relays to a common source. I imagine it would look something like this:

at .5v pin/wire A would be connected to src
at 1v pin/wire B would be connected to src
at 1.5v pin/wire c would be connected to src

where src would probably be 5v constant.

This could either be each pin stays connected/on as the next one is toggled or they toggle off as the next pin is switched on.

I could probably build the logic using resistors or low voltage relays. Just curious if there is a better way

I would probably pull power externally, maybe from a usb port as it provides more power than the serial port or with an external adapter. The varying input could be generated/changed as fast as 39ms per cycle but it will be based off user input so realistically it could be slower 100ms maybe 200ms.