Add a column to a Views table display conditional on argument
I don't know if this is the best way to do it, but when I've needed conditional columns I've removed them in hook_views_pre_build() (which is before the query gets built). The code would be something like this:

/**
 * Implements hook_views_pre_build().
 *
 * Removes column X on condition Y from all displays of view Z.
 */
function MYMODULE_views_pre_build(&amp;$view) {

  // Check this is the right view.
  if ($view-&gt;name != 'Z') {
    return;
  }

  // Check if the column should be removed.
  if (!$Y) {
    return;
  }

  unset($view-&gt;field['X']);
}


The code above will affect all displays of the view. If you want to target a particular display just check against $view-&gt;current_display as well.