I am a developer for Cognito Forms.
The example you included was from this blog post on three ways to implement discounts in Cognito Forms.
The syntax for the discount calculation would be:
=CouponCode = "CODE1" ? 0.15 : CouponCode = "CODE2" ? 0.25 : 0
The syntax is a bit cryptic (used by JavaScript and other C languages), but generally it is:
[condition] ? [true result] : [false result]
But you can chain them together indefinitely like:
[condition 1] ? [true result 1] : [condition 2] ? [true result 2] : [condition 3] ? [true result 3] : [false result]
The full documentation for calculations can be found on the Cognito Forms help siteCognito Forms help site.