This paper deals with the decision problem of choosing an optimal medical treatment, among M possible candidates, when the states of nature are the net benefit of the treatments, and regression models for the treatment cost and effectiveness are assumed. In this setting a crucial step in the analysis is the construction of the population subgroups sharing characteristics specified by the covariates, so that optimal decisions are now not for the whole population of patients but for patient population subgroups. We argue that the existing formulations of population subgroups in the literature are too rigid and unrealistic for real applications, and instead we formulate the population subgroups on the base of selected ‘influential’ covariates. The Bayesian variable selector we use is an optimal one under the 0–1 loss function, which means choosing the subset of covariates having the highest posterior probabilities based on the so‐called intrinsic priors, an objective Bayesian tool that exhibits an excellent performance. For each population subgroup we study the optimal Bayesian decisions for two different utility functions. One optimal decision is that obtained maximizing the expected net benefit, and the other maximizing the expected number of times that the treatment having the highest net benefit is chosen. Illustrations of the procedure for real data show that the subset of influential covariates may vary across treatments. Subgroup optimal treatments are derived and compared with those given by preceding methods.