Semiparametric Bayesian procedure for selecting a subset