What's your signal like and what THD performance do you want?
Mic-In have a high gain mic-phone preamp which is for very small signal but degradation the system THD performance. Line-In usually mean bypass that preamp and direct feed input to the ADC, which is good for 1 Vrms or 2 Vrms "standard" line level.
A typical PC onboard sound card will have better than -50dB THD for mic-in and -80dB for the line-in, which is good enough for most case. But be careful some mic-in have AGC that can not be by-passed, and the frequency response is not that flat (some will have low cut or voice boost

).
A dedicated sound card will have better performance, and also other feature like variable gain and attenuation setting. Which is good for different signal level.
I'd recommend try onboard sound card first to see if it suits your need. Entry level dedicated sound card usually don't have enough performance advantage over onboard sound card. Professional sound card is much much more expensive(almost 1 decade higher).
If you really need high performance comparable to an audio analyzer but with budget price, the E1DA Cosmos ADC may be a good choice. It has good reputation among some audio hobbyists.
Also be careful with the OS sound mixer, it sometime can ruin your test. If your software support input method like WASAPI or ASIO, the use it rather than DS(DirectSound or System Sound). If not, make sure you have disabled system sound effect, mic-phone boost, noise reduction, etc.