Learned and adaptive behaviors rely on neural circuits that flexibly couple the same sensory input to alternative output pathways. Here, we show that the Drosophila mushroom body functions like a switchboard in which neuromodulation reroutes the same odor signal to different behavioral circuits, depending on the state and experience of the fly. Using functional synaptic imaging and electrophysiology, we reveal that dopaminergic inputs to the mushroom body modulate synaptic transmission with exquisite spatial specificity, allowing individual neurons to differentially convey olfactory signals to each of their postsynaptic targets. Moreover, we show that the dopaminergic neurons function as an interconnected network, encoding information about both an animal's external context and internal state to coordinate synaptic plasticity throughout the mushroom body. Our data suggest a general circuit mechanism for behavioral flexibility in which neuromodulatory networks act with synaptic precision to transform a single sensory input into different patterns of output activity. PAPERCLIP.