No problem at all.
You should be able to do this using and expression and some nested If
statements. First wire the heights in order to a new Arithmetic node, like this:
Then select the Arithmetic node and change the mode to expression. To create an if statement you use this syntax
if(x=y,value returned if true, value returned if false)
So to test for a material ID, you would use...
By nesting many if statements together you can create as many possible outcomes as you need, for example, here's a group of nested if statements to detect 6 materials IDs and return the values wired to the corresponding inputs:
I've attached a sample file that combines this with the limiting nodes shown in the other post. I hope that helps.