First off, your example is not well-formed XML. Overlooking that and that you didn't describe your intents very well (What exactly do you want to select on which condition?), I assume you want to do this:
//cc[preceding-sibling::bb[text()="zz"]]/text()
It selects
TEXT VALUES OF ALL <CC> ELEMENTS
//cc /text()
THAT HAVE A PRECEDING SIBLING <BB>
[preceding-sibling::bb ]
THAT HAS TEXT VALUE EQUAL TO "zz"
[text()="zz"]
You could write is also as
//bb[text()="zz"]/following-sibling::cc/text()
Please look at the spec, it has some very well readable examples from which you'll learn a lot.
Q: How to select a node using XPath if sibling node has a specific value?
Because there are only "XPath Axes" for following-siblings and preceding-siblings, you can use one of them if the position is fixed.
But better:
Look for cc were the parent has child bb with value 'zz':
Explanation: Any bb that contains 'zz' string in all the child nodes of bb then going to parent node of that bb using .., now that we can access the cc so returning text.