You mentioned "It will display the records in which the name starts with AB."
But it will
display the records in which the name is AB_.
Please modify your query to
the one suggested by Pandians
as
SELECT [name],roll FROM Student WHERE [name] LIKE 'AB%'
in order to fetch what is mentioned !!