This answer is for selecting a mip level in Direct3D 9 and beyond.
Direct3D 11 has a lot to offer in selecting the mip level.
However, in Direct3D9, which a lot of us still use due to the wide range of platforms it is supported, the trick was to use the
SetSamplerState(Index, D3DSAMP_MIPMAPLODBIAS, PCardinal(@Value)^);
SetSamplerState(Index, D3DSAMP_MAXMIPLEVEL, PCardinal(@Value)^);
(the above is in Delphi/Object Pascal notation, but is easy to see how it would be in C++)
Say for example you want to use only the 3rd mip level. You should execute:
SetSamplerState(Index, D3DSAMP_MAXMIPLEVEL, 3);
SetSamplerState(Index, D3DSAMP_MIPMAPLODBIAS, -1000);
The above forces the max mip level to 3 (instead of 0), and then forces the bias to -1000 so that level 3 is always selected.