How to add generated column to db2 table?
Db2 versions for different platforms tend to have different features and statement syntax details, so you should always consult documentation for your exact database version and platform. If you do so, you will see that you can only use a limited selection of expressions for generated columns -- either an identity or a row change timestamp.
Instead of a generated column I suggest you simply create a view with your CASE expression for an extra column.