A Flexible Approach to Measurement Error Correction in Case-Control Studies