Hide Table Column if no values exist

I am running the following query to populate a table:
[size=85][color=#FF0000]SELECT *
FROM
(
SELECT pvp.MaterialDescription, pvp.CurrentPrice, cb.ShortDesc
FROM
po_vendor_prices_1270 as pvp
JOIN Codes_Branch as cb
ON (pvp.Branch = cb.Branch)
WHERE cb.BranchGroup = ‘NW’ AND pvp.SupplierNo = ‘{Root Container.selectedName}’
GROUP BY cb.ShortDesc, pvp.MaterialDescription, pvp.CurrentPrice
) x
pivot
(
sum(CurrentPrice)
FOR ShortDesc
IN ([ANCHORAGE],[BEND OR],[BILLINGS],[EUGENE OR],[PASCO WA],[PORTLAND],[TACOMA WA],[WHITE CITY],[WOODINVILL])
) p[/color][/size]

I would like to hide the established columns that do not have values in any of the rows, I understand that I will have to tap into the Column Attributes Data via scripting but I’m not quite sure of how to this. Can I change my query to not create a column if values are NULL, would that be easier to do? What would the scripting look like to do this?