Generating dynamic Tabs with multiple query post loop

You need to do a foreach for the get_the_category

Something like:

while ($my_query->have_posts()) : $my_query->the_post();

$x = $my_query->current_post + 1;  //you can use this to count instead
$categories = get_the_category();

foreach($categories as $category) {
 if ($x == 1) ...
//rest of your output
// remember to us $category->cat_name; instead of what you have above
}