Depends on the mcu and how much memory you have.
If you had lots of ram you use the ADC input which is an integer, as an index into a lookup table.
If you are shorter on ram then you could do the same but make the lookup table (array) smaller and interpolate the point.