protected function _prepareCollection()
{
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToFilter(
array(
array('attribute'=>'category_ids','finset'=>2),
array('attribute'=>'category_ids','finset'=>3)
)
);
}
use your own attribute name and value to get the data