The easy way to do this would be with conditional visibility:
Alternatively, depending on whether or not your image is an SVG, you can use conditional styling to achieve the same effect.
Other option could also be if the values are enumerable (fixed set of values) to define an enum where you have the possibility to specify a image for each value.