This may give you some ideas :
Public Function getQuestion() As String
Dim rowCount As Integer
Dim randomNumber As Integer
Dim filePath As String = "the path to your database"
Dim tableName As String = "the name of a table in your database"
Dim fieldName As String = "the field name in the table that holds the data you want"
Dim conString As String = "the connection string to your databse"
Dim strSQL As String = "Select * from " & tableName
Dim con As New OleDb.OleDbConnection(conString)
Dim ds As New DataSet
Dim da As New OleDbDataAdapter(strSQL, con)
con.Open()
da.Fill(ds)
con.Close()
rowCount = ds.Tables(0).Rows.Count
randomNumber = New Random().Next(0, rowCount)
Return ds.Tables(0).Rows(randomNumber).Item(fieldName)
End Function
Hope it helps.