I have a table with values, where each value is according to weight (kg).
Up to 3kg = $ 20.00
Up to 5kg = $ 25.00
Up to 10kg = $ 28.00
SELECT estado, kg, valorCap, valorExcedCap, valorAloremCap, prazoCap
FROM transportadoras_valores
WHERE id_transportadora = '1' && estado = 'AL' && kg = '4'
In this example I need to return the value of 5kg.
I have an online example: