è possibile estrapolare dal database soltanto i file che finiscono per .jpg , .png , . gif?

Questa è la select:

<select size="1" name="foto" style="font-family: Arial; font-size: 8pt; font-weight: bold">


<%
selectordina = "SELECT * From 4allegati ORDER by id"
set dbcS = connession.Execute (selectordina)
if not dbcS.EOF then
do while not(dbcS.eof)
allegati = dbcS ("allegati")
%>



<option value="<%=allegati%>"><%=allegati%><hr> </option>

<%
dbcS.movenext
loop
else
response.write "

" & SuperErrors
end if
set dbcS = nothing
connession.Close ()
set connession = nothing
%>

</select>