One way to do this is to split the data based on the operator. For example to multiply, perhaps something like:
CAST( SUBSTRING('25*100' FROM 1 TO (POSITION('*' IN '25*100') - 1)) AS INTEGER)
CAST( SUBSTRING('25*100' FROM (POSITION('*' IN '25*100') + 1) TO 9999999) AS INTEGER)
To clarify the situation, using a single string to do this is a bad idea. What actually would be required is to use a lexer to properly split the operations into correct order.
The example works only with a single multiply operation, nothing else.
So the overall solution should be to rethink the application design in order to handle the calculations in some different way.