Alternative of JOIN with BETWEEN
I've faced similar issue - the thing is sql doesn't "know" that cola and colb is range and cola of next row will always be bigger than current row colb, so between won't help too much: when it will find first cola that matches between, it will continue checking others also.
I would suggest query that uses cross apply to find max(table2.cola) &lt;= table1.cola and then to verify add where table2.colb &gt;= table1.cola
Something like this

SELECT      t1.cola AS [InputValue]
           ,t2.cola
           ,t2.colb
           ,t2.colc
           ,t2.cold
           ,t2.code
FROM        table1 t1
CROSS APPLY (   SELECT   TOP 1
                         t2.cola
                        ,t2.colb
                        ,t2.colc
                        ,t2.cold
                        ,t2.code
                FROM     table2 t2
                WHERE    t1.cola &gt;= t2.cola
                         AND t1.cola &lt;= t2.colb
                ORDER BY t2.cola DESC ) t2;