Example 14 How many different numbers must be selected from $1,2,3, \cdots, 1000$ to ensure that there are 3 different numbers among the selected ones that can form the lengths of the three sides of a triangle?