A growing number of studies on the higher-order cognitive functions of the human brain use brain-imaging techniques, such as functional magnetic resonance imaging (fMRI). For the validity and generality of fMRI results, it is important that the relevant cognitive processes are equivalent to those functioning in typical settings used in behavioral research. This equivalence could be, for example, endangered by different spatial frames of reference when lying in the scanner. In the present study, we tested whether the cognitive processes, as reflected in behavioral data in brain-imaging settings, are indeed functionally equivalent to those reflected in "purely" behavioral settings. To this end, we used a task-switching paradigm with a spatial component, increasing the likelihood to find effects of experimental setting. We compared the data of three different groups that only differed in testing environments (real, operating fMRI vs simulated fMRI vs standard behavioral with upright position of participants) but used otherwise strictly equivalent experimental conditions. Of importance for our validation purposes, unlike previous studies, we included a group with a behavioral setting, and we tested whether we would replicate a nontrivial, complex three-way interaction across all three groups. We replicated the predicted complex data pattern in all groups, suggesting functional equivalence of the underlying cognitive processes. We also found strongly increased reaction time (RT) levels in the two fMRI groups. We attribute this increase to unspecific distracting factors affecting late motor processes and discuss potential methodological implications of this increased baseline RT in the scanner.