Here is an example:
Table T1
Columns EMPNAME, EMPID

There is an index on EMPID column.
Table and INDEX are analyzed so that CBO uses them for optimal execution paths.

The Query is:
Select empid, empname
from T1
where empid between 2000 and 4000;

Assume that 1000 rows are having the empid values between 2000 and 4000, and the table has totally 1300 rows.

The optimizer calculates the index cost and table cost in order to fetch the relevant rows from the table. If the cost is very high for searching empid values in the index for the range (2000 and 4000), then it will not use the index. Hence, full table scan will be performed on the table.