Selecting a row by index in a table viewer isn’t very straightforward. There is no method like tableViewer.setSelectionIndex.
Here is a snippet how its done:
int selection = 5; //row we want to select
tableViewer.setSelection(new StructuredSelection(tableViewer.getElementAt(selection)),true);