Views and theme functions for nodes
Display Suite Extras, shipped with Display Suite, lets you choose a different build mode for every row in the View. You might look its code to see how it's done and then hook into it to switch based on the value of a node field. Shouldn't be hard.