Coding Price in Database

I created a survey that takes in multiple components to create a unique product. For example, the components of a picture frame: Size, glass type, border material, etc. I’d like a way to create a code (maybe an ‘if’ statement) in the database that would output the price for that specific picture frame given the inputted components. In addition, I’d like the price to be multiplied by the quantity of picture frames the customer is ordering. Is there anyway this could be done?

Thank you for the help! I look forward to any advice.