Although a used car’s condition is often closely associated with mileage, they are separate factors. An abused wreck of a car with 10,000 miles obviously won’t be fetching a higher price as compared to a well-maintained counterpart with 100,000 miles.
Value that is based on a car’s condition is arguably going to be more subjective. Different buyers will base how ‘good’ a car’s overall condition is on their own preferences. Some buyers might see a car with numerous dents and scratches but with a perfectly working transmission as ‘great’ in condition while others might be more influenced by its external looks and perceive the car to be in ‘bad’ condition.
If your car is in need of minor repairs, you should always have them performed before considering to sell it. In the overwhelming majority of cases, the costs of such repairs will always be less than the value reduction otherwise. A replacement side mirror could be bought off eBay for some 12-30 dollars, trying to sell a used car with a broken one could well translate to a loss of hundred or so dollar in value.
For major repairs, it can get somewhat more complicated. You could try using authoritative online resources such as Kelley Blue Book to have an estimate of your car’s pricing. Then you can consult a mechanic to give you a quote of the repairs or replacement costs and do the math to see if the cost could be offset by the increase in value.