How to value mapping with another value?

Hello everyone,
In the Edit panel I used Stat.
I can not do what I wanted, namely:
i have 2 query, value and quality, i want to show only value in green when quality is 0, and in gray when quality is 1.
is it possible? if so, how to do it?
thank you in advance.

To make it look like this:

Or here’s the second option: