IF statement on LTspice
Then you can either

Create a B source with the conditional statements and an additional signal (which is useful for debugging)

Nest the if statements
if(condition,valueiftrue,if(condition,valueiftrue,valueiffalse))