I would change the query to rename the field on retrieval. e.g.
Code:
SELECT ...,`ccost[0]` AS ccost0, ... FROM ....
Then you can refer to it as {$product.proddata.ccost0}
Another option might be:
Code:
{assign var='ccost0' value='ccost[0]'}
{$product.proddata.$ccost0}