Enum is a very convenient way of representing a group of information that is fairly static. For example, Sex, Marital Status, and such can be represented by Enum. Enum is great way to do things instead of constant because it is more intuitive and easy to work with. However, when we store Enums to database or transfer it as a message to another process, we convert it into String. The question now is, how do we turn back a String to Enum? Below are some examples that converts a String to Enum in Groovy. And we know that Groovy has beautiful magic to do this.