Change Version to case statement

Version was done using an array, but the code was a bit complicated. It
now uses a case statement, which is more code, but it’s more elegant
and easy to understand.