One Alert rule with severity/thresholds: warn, critical etc

The above was a copy/paste error on my part. In reality, it would be something like this:

severity={{if gt $values.B.Value 20.0 }}low{{else}}warning{{end}}
severity={{if gt $values.B.Value 25.0 }}medium{{else}}warning{{end}}
severity={{if gt $values.B.Value 30.0 }}high{{else}}warning{{end}}

But I still do not know what I would do with expression C (which is $B > 25.0), and how that relates to the custom severity labels.