Case-control studies are commonly used to determine the genetic basis of binary traits. They can involve structured samples, either through the presence of population structure or of related individuals, which generates correlation between individuals that needs to be accounted for during modeling. A logistic mixed model, while being computationally challenging to fit and often requiring a trade-off between estimation accuracy and computational speed, is a natural choice given the structure of the data. We use a MCMC-based approach to fit this model and perform a retrospective test between the trait and each genotype; the genotype is considered as random and the analysis is done conditional on the trait and covariates. This is to gain from robustness to various sources of trait model misspecifications such as exclusion of important covariates and ascertainment, which is when individuals are sampled based on some criterion (e.g. trait status) but is unknown during analysis and needs to be adjusted for when the trait is treated as random such as in prospective analyses. We examine the performance of this procedure through simulation studies as well as provide a real data application.