Your original post doesn't have a lot of detail, but let's say you have a field that could be true or false, and you want to display a particular header based on the value of that field.
You'd put two calculated value controls in your table header. One would have the text you wish to display if the field is true. It would be conditionally formatted to hide if the field was false. The second value would have the text you wish to display if the field is false. It would be conditionally formatted to hide if the field is true.
You can also use a more complex expression to create a conditional value for your calculated value field (or expression box if InfoPath 2010) - more on that here.