Hi Tim,
I think you can use Case statements
Ref: https://docs.mendix.com/refguide/oql-case-expression/
Hope it Helps!!
I am surprised that this is not a function more widely used within the OQL.
However, the replace() was just luck that it worked in Mx8 and unfortunately does not look like it will be fixed by Mendix.
So, for anyone who needs to do any type of replace() call in OQL, unless it is a reasonably simple replace that you are doing wherein you can use a Case statement and perhaps a like function which when true can return a value, then you may need to think in terms of changing the process to carry out the replace() in a microflow.
It is not possible to carry out a select replace() of a character in a string or a phrase within a string within the OQL statement as there is no availability of a start position or end position or concatenation etc within the statement.
If someone knows different, it would be good to hear it.