Nope, InDesign doesn't do conditional styles. It would be a very useful
feature and you should consider filing a feature request.
You still have to do it all manually -- define a separate paragraph
style for each difference, and apply the paragraph styles manually. So
you might have a style called "Subhead A" and another called "Subhead A
following Chapter Title" etc. etc.
To help keep all this under control, it's probably worth taking the time
to create paragraph style groups and put the different, but related,
paragraph styles in their own group. But this is purely an
organisational thing -- it doesn't actually provide any extra functionality.
To cut out the tiresome process of having to go through all your
document applying the right paragraph styles, I sell a script on my
website (www.freelancebookdesign.com) called "Change Consecutive
Paragraphs", which allows you to say something like: "Whenever Subhead A
is followed by Chapter Title, replace Subhead A with
Subhead-A-following-Chapter-Title" etc. It then goes through the
document and makes the necessary adjustments. Many people use this
script to save them hours of tedious work. Worth checking out if you'll
be doing a lot of this, I think.
I recommend it, and not just because I get the price of a pizza per license sold! It really saves time.
Shameless plug: It's worth having a look at this page on my website: http://www.freelancebookdesign.com/scripts
It's a quick summary of all the scripts I sell. It's good to know what's out there for your hour of need! Why slog away when there's a cheap script available that will do the work for you!
What makes this such a good feature request, though, is that Adobe is focusing on ePub export these days. Well, if they implemented conditional paragraph styles, that could be carried through to ePub export -- since the CSS for this sort of thing is respected by ePub viewers as far as I can tell.
Seems like a no-brainer to me.