I have a table which consists of column that stores dynamic formula, and the value for each formula is stored in another table column while one value (TOTAL) is saved on the same table. I want to substitute the formula with the value stored on the other table column and calculate the results of the replaced formula.

For Example:

Thank you guys