When dealing with custom types, you likely want to do different things based on the actual value of the custom type. The case of expression provides this flexibility.
You can use pattern matching on other things than just custom types. Like integers: