To investigate which activity patterns in sensory cortex are relevant for perceptual decision-making, we combined two-photon calcium imaging and targeted two-photon optogenetics to interrogate barrel cortex activity during perceptual discrimination. We trained mice to discriminate bilateral whisker deflections and report decisions by licking left or right. Two-photon calcium imaging revealed sparse coding of contralateral and ipsilateral whisker input in layer 2/3, with most neurons remaining silent during the task. Activating pyramidal neurons using two-photon holographic photostimulation evoked a perceptual bias that scaled with the number of neurons photostimulated. This effect was dominated by optogenetic activation of non-coding neurons, which did not show sensory or motor-related activity during task performance. Photostimulation also revealed potent recruitment of cortical inhibition during sensory processing, which strongly and preferentially suppressed non-coding neurons. Our results suggest that a pool of non-coding neurons, selectively suppressed by network inhibition during sensory processing, can be recruited to enhance perception