I am not sure why would you want to fetch records that were not requested by user, but here is one approach to your problem
Lets consider a sample table with a list of random names
DECLARE @Sample TABLE
(
ID INT IDENTITY(1,1) PRIMARY KEY,
SampleText VARCHAR(50)
)
INSERT INTO @Sample
SELECT 'abc' UNION ALL
SELECT 'abc1' UNION ALL
SELECT 'abc2' UNION ALL
SELECT 'abc3' UNION ALL
SELECT 'abc4' UNION ALL
SELECT 'xyz' UNION ALL
SELECT 'xyz1' UNION ALL
SELECT 'xyz2' UNION ALL
SELECT 'xyz3' UNION ALL
SELECT 'efg' UNION ALL
SELECT 'pqr' UNION ALL
SELECT 'mno' UNION ALL
SELECT 'efg' UNION ALL
SELECT 'sfr' UNION ALL
SELECT 'qwd' UNION ALL
SELECT 'gte' UNION ALL
SELECT 'sdf' UNION ALL
SELECT 'gtg' UNION ALL
SELECT 'sde'
Lets assume user requested for records that start with abc. First thing to do is to find the number of records that match this criteria.
DECLARE @Count INT
SELECT @Count = COUNT(*) FROM @Sample WHERE SampleText LIKE 'abc%'
Next get all the records that match the criteria and if the number of records matching the criteria is less than 10 then fetch other records (which don't match the user's criteria) so total records retrieved is 10.
SELECT TOP 10 * FROM @Sample WHERE SampleText LIKE 'abc%'
UNION ALL
SELECT TOP (10 - CASE WHEN @Count > 10 THEN 10 ELSE @Count END) * FROM @Sample WHERE ID NOT IN (SELECT ID FROM @Sample WHERE SampleText LIKE 'abc%')