How can I select a field value in PostgreSQL based to the date computation within the table?
Sort the result (descending) by the value of end_date - now() and limit to only one row:

SELECT dollar_value, end_date - now() 
from dollar_rate
order by end_date - now() desc
limit 1;


The computation end_date - now() is actually unnecessary in this case, you can simplify this to:

SELECT dollar_value, end_date - now() 
from dollar_rate
order by end_date desc 
limit 1;