What would be the most expensive cost to repair an engine light diagnosis? on 1999 Mercury Grand Marquis

Would this require major work, and if so, what would be the approximate cost to make major repairs? The "check engine light" stayed on continuously. Need cost of diagnosis plus cost of any possible major repairs....Thank you.

free at autozone