How to remove results returned from Views UI I am getting results as expected using Views UI. But I don't want to display a particular record from the output of Views UI. How to achieve this and will I require any hooks for this?

For example; My Views return result as 1,2,3,4. Now I don't want to show 1 in the result. I cannot change the query using hook_views_query_alter as 1 is being used in "where" clause.
An answer to this question very much turns on what record you want to exclude from the listing. But the typical route here is to use a Contextual Filter on your view.

A typical pattern is that you are displaying a View alongside a node, e.g. a view of items that are related to that node. In this case, you want to exclude the node itself. For this you create a contextual filter that provides a default value of the the current node when there is no filter value present in the URL. You then check the exclude box in the contextual filter configuration. (Detailed steps below.)

Update In comments, you give more detail about what you want to exclude. Or, put another way, what you want to include. In general terms, you want to include nodes that share ANY taxonomy terms with the current node. Specifically, if you have a Teacher content type and a Subject taxonomy, then your requirement is to show every teacher that shares ANY of the taxonomy terms (representing subjects taught) of the currently displayed teacher.

Contextual Filters can do this out of the box, although the configuration is not especially intuitive. The approach is to add a Content: Has taxonomy term ID contextual filter and then configure it so it pulls taxonomy terms out the current node. (Detailed steps below.)

Stage one: Exclude current node


Add a contextual filter Content: Nid (under ADVANCED to the right of the Views configuration page).
Under WHEN THE FILTER VALUE IS NOT IN URL select 'Provide a default value' and choose 'Content ID from URL'. (This gets the node id.)
In the MORE section check the box 'Exclude'. (This says instead of filtering to show only the node, filter to show anything but the node. Of course, the normal non-contextual filters also apply.)


You can add more than one Contextual filter to build up more complex conditions. And, as noted above, you can write PHP for the Contextual filter.





Stage two:  Include all nodes that share ANY of the taxonomy terms of the current node

(aka, exclude any nodes that don't have any common taxonomy terms with the current node, but include everything else)


Add a contextual filter Content: Has taxonomy term id.
Under WHEN THE FILTER VALUE IS NOT IN URL select 'Provide a default value' and choose 'Taxonomy term ID from URL'. (This is a powerful option and what it does depends on the next configuration steps.)
Uncheck the 'Load default filter from term page' box.
Check the 'Load default filter from node page, that's good for related taxonomy blocks'
You will usually want to check the 'Limit terms by vocabulary' box and then select the relevant vocabulary, e.g. 'Subjects'. You might skip this step if you know you only have term reference field on kinds of nodes you are interested in. But it does not harm to check it even in these cases.
Under Multiple-value handling select the 'Filter to items that share any term' option.
Further down the configuration find the 'Reduce duplicates' check box and check it.
Open up the MORE fieldset at the bottom of the configuration and check 'Allow multiple values'