You have to define a running header based on a character style and apply
the char style to your titles.
Alternatively, you could create 2 master pages with two different
paragraph-based running header text variables.
You have to create for each style a single text variable and insert both in the placeholder on the master.
Willi, I don't think that will work. Because you'll end up getting two
running heads, no?