Can we make a subgroup of a group by selecting exactly one element from each distinct left cosets of a subgroup of the given group? Let $G$ be a group and $H$ be a subgroup of $G$ ; can we select exactly one element from each distinct left coset of $H$ such that the set of all those elements form a subgroup of $G$ ? How do we characterize those groups and for given groups , those subgroups , for which it is possible ?

If $H$ is a retract of $G$ or a kernel of a retraction of $G$ then it is possible (in other words: if $H$ is a semidirect factor of $G$). But I am not sure if that exhausts all possibilities.
