Conditional variables


in my case linked to this problem:

How can i create formulas (syntax) to process conditions like in spreadsheets (some simple IF-THEN-ELSE-constucts)?

Background: Used for compressible components like joints or other elastomeres for displaying them in a compressed or uncompressed state.

Thank you very much!

Best Regards,
Robert Goldbach