You have what you have used in stored procedures like this for reference, though they are not intended to be used as you have now. You can use IF, but a Case statement is better for eyes. Like this:
WHEN qty_1 <= '23' THEN price
WHEN '23' > qty_1 && qty_2 <= '23' THEN price_2
WHEN '23' > qty_2 && qty_3 <= '23' THEN price_3
WHEN '23' > qty_3 THEN price_4
END) AS total
This seems cleaner. I think you do not need the inner SELECT anyway.
Want to become an expert in SQL? Join the SQL course fast!
For more details on MySQL, refer to the below MySQL Tutorial video.